Specifications of Arduino:
TTL level UART
Voltage level for TTL level UART
Programming
/* Name : main.c * Purpose : Source code for LED Interfacing with ATmega328p. * Author : Gemicates * Date : 27-12-2017 * Website : www.gemicates.org * Revision : None */ #include "Arduino.h" // Pin 9, 10, 11 have LED's connected on Arduino board const int LED1 = 9, LED2 = 10, LED3 = 11; // the setup routine runs once when you press reset void setup() { pinMode(LED1, OUTPUT); // initialize the digital pins as an output pinMode(LED2, OUTPUT); pinMode(LED3, OUTPUT); } // the loop routine runs over and over again forever void loop() { digitalWrite(LED1, HIGH); // turn the LED1 ON by making the voltage level HIGH delay(100); // function call for delay digitalWrite(LED1, LOW); // turn the LED1 OFF by making the voltage LOW delay(100); // function call for delay digitalWrite(LED2, HIGH); // turn the LED2 ON by making the voltage level HIGH delay(100); // function call for delay digitalWrite(LED2, LOW); // turn the LED2 OFF by making the voltage LOW delay(100); // function call for delay digitalWrite(LED3, HIGH); // turn the LED3 ON by making the voltage level HIGH delay(100); // function call for delay digitalWrite(LED3, LOW); // turn the LED3 OFF by making the voltage LOW delay(100); // function call for delay }